extends "res://scripts/playerState/PlayerState.gd"


func Enter() -> void:
	super.Enter()
	
func Physic_Update(_delta:float) -> void:
	super.Physic_Update(_delta)
	if is_press_jump:
		transition_to("jump")
	if input_direction != 0 and player.is_on_floor():
		player.velocity.x = play_run_speed * input_direction
		animated_sprite_2d.play("running")
		animated_sprite_2d.flip_h = input_direction < 0
	elif input_direction == 0 and player.is_on_floor():
		player.velocity.x = 0
		transition_to("idle")
	elif not player.is_on_floor():
		transition_to("fall")
		
